<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
 <head>
  <meta http-equiv="content-type" content="text/html; charset=UTF-8">
  <title>Returns information from the message queue data structure</title>

 </head>
 <body><div class="manualnavbar" style="text-align: center;">
 <div class="prev" style="text-align: left; float: left;"><a href="function.msg-set-queue.html">msg_set_queue</a></div>
 <div class="next" style="text-align: right; float: right;"><a href="function.sem-acquire.html">sem_acquire</a></div>
 <div class="up"><a href="ref.sem.html">Semaphore 函数</a></div>
 <div class="home"><a href="index.html">PHP Manual</a></div>
</div><hr /><div id="function.msg-stat-queue" class="refentry">
 <div class="refnamediv">
  <h1 class="refname">msg_stat_queue</h1>
  <p class="verinfo">(PHP 4 &gt;= 4.3.0, PHP 5)</p><p class="refpurpose"><span class="refname">msg_stat_queue</span> &mdash; <span class="dc-title">Returns information from the message queue data structure</span></p>

 </div>
 
 <div class="refsect1 description" id="refsect1-function.msg-stat-queue-description">
  <h3 class="title">说明</h3>
  <div class="methodsynopsis dc-description">
   <span class="type">array</span> <span class="methodname"><strong>msg_stat_queue</strong></span>
    ( <span class="methodparam"><span class="type">resource</span> <code class="parameter">$queue</code></span>
   )</div>

  <p class="para rdfs-comment">
   <span class="function"><strong>msg_stat_queue()</strong></span> returns the message queue meta data
   for the message queue specified by the <em><code class="parameter">queue</code></em>.
   This is useful, for example, to determine which process sent the message
   that was just received.
  </p>
 </div>


 <div class="refsect1 parameters" id="refsect1-function.msg-stat-queue-parameters">
  <h3 class="title">参数</h3>
  <p class="para">
   <dl>

    
     <dt>
<em><code class="parameter">queue</code></em></dt>

     <dd>

      <p class="para">
       Message queue resource handle
      </p>
     </dd>

    
   </dl>

  </p>
 </div>


 <div class="refsect1 returnvalues" id="refsect1-function.msg-stat-queue-returnvalues">
  <h3 class="title">返回值</h3>
  <p class="para">
   The return value is an array whose keys and values have the following
   meanings:
   <table class="doctable table">
    <caption><strong>Array structure for msg_stat_queue</strong></caption>
    
     <tbody class="tbody">
      <tr>
       <td><em>msg_perm.uid</em></td>
       <td>
        The uid of the owner of the queue.
       </td>
      </tr>

      <tr>
       <td><em>msg_perm.gid</em></td>
       <td>
        The gid of the owner of the queue.
       </td>
      </tr>

      <tr>
       <td><em>msg_perm.mode</em></td>
       <td>
        The file access mode of the queue.
       </td>
      </tr>

      <tr>
       <td><em>msg_stime</em></td>
       <td>
        The time that the last message was sent to the queue.
       </td>
      </tr>

      <tr>
       <td><em>msg_rtime</em></td>
       <td>
        The time that the last message was received from the queue.
       </td>
      </tr>

      <tr>
       <td><em>msg_ctime</em></td>
       <td>
        The time that the queue was last changed.
       </td>
      </tr>

      <tr>
       <td><em>msg_qnum</em></td>
       <td>
        The number of messages waiting to be read from the queue.
       </td>
      </tr>

      <tr>
       <td><em>msg_qbytes</em></td>
       <td>
        The maximum number of bytes allowed in one message queue. On
        Linux, this value may be read and modified via
        <var class="filename">/proc/sys/kernel/msgmnb</var>.
       </td>
      </tr>

      <tr>
       <td><em>msg_lspid</em></td>
       <td>
        The pid of the process that sent the last message to the queue.
       </td>
      </tr>

      <tr>
       <td><em>msg_lrpid</em></td>
       <td>
        The pid of the process that received the last message from the queue.
       </td>
      </tr>

     </tbody>
    
   </table>

  </p>
 </div>


 <div class="refsect1 seealso" id="refsect1-function.msg-stat-queue-seealso">
  <h3 class="title">参见</h3>
  <p class="para">
   <ul class="simplelist">
    <li class="member"><span class="function"><a href="function.msg-remove-queue.html" class="function" rel="rdfs-seeAlso">msg_remove_queue()</a> - Destroy a message queue</span></li>
    <li class="member"><span class="function"><a href="function.msg-receive.html" class="function" rel="rdfs-seeAlso">msg_receive()</a> - Receive a message from a message queue</span></li>
    <li class="member"><span class="function"><a href="function.msg-get-queue.html" class="function" rel="rdfs-seeAlso">msg_get_queue()</a> - Create or attach to a message queue</span></li>
    <li class="member"><span class="function"><a href="function.msg-set-queue.html" class="function" rel="rdfs-seeAlso">msg_set_queue()</a> - Set information in the message queue data structure</span></li>
   </ul>
  </p>
 </div>
  

</div><hr /><div class="manualnavbar" style="text-align: center;">
 <div class="prev" style="text-align: left; float: left;"><a href="function.msg-set-queue.html">msg_set_queue</a></div>
 <div class="next" style="text-align: right; float: right;"><a href="function.sem-acquire.html">sem_acquire</a></div>
 <div class="up"><a href="ref.sem.html">Semaphore 函数</a></div>
 <div class="home"><a href="index.html">PHP Manual</a></div>
</div></body></html>
